$OpenBSD: patch-src_build_py,v 1.3 2013/07/06 11:19:48 landry Exp $
Set shlib version, don't do stupid symlinks, dont call ldconfig
--- src/build.py.orig	Tue Jun  4 03:35:27 2013
+++ src/build.py	Sat Jul  6 13:13:32 2013
@@ -37,9 +37,6 @@ def call(cmd, silent=True):
     elif not silent:
         print stderr
 
-def ldconfig(*args,**kwargs):
-    call('ldconfig')
-
 if env['LINKING'] == 'static':
     lib_env.Append(CXXFLAGS="-fPIC")
 
@@ -98,7 +95,7 @@ if env['PLATFORM'] == 'Darwin':
     _d = {'version':env['MAPNIK_VERSION_STRING'].replace('-pre','')}
     mapnik_lib_link_flag += ' -current_version %(version)s -compatibility_version %(version)s' % _d
 else: # unix, non-macos
-    mapnik_libname = env.subst(env['MAPNIK_LIB_NAME']) + (".%d.%d" % (int(ABI_VERSION[0]),int(ABI_VERSION[1])))
+    mapnik_libname = 'libmapnik.so.${LIBmapnik_VERSION}'
     if env['PLATFORM'] == 'SunOS':
         if env['CXX'].startswith('CC'):
             mapnik_lib_link_flag += ' -R. -h %s' % mapnik_libname
@@ -421,9 +418,7 @@ else:
             os.remove(trgt)
         os.symlink(os.path.basename(src), trgt)
 
-    major, minor, micro = ABI_VERSION
-
-    soFile = "%s.%d.%d.%d" % (os.path.basename(env.subst(env['MAPNIK_LIB_NAME'])), int(major), int(minor), int(micro))
+    soFile = "%s.${LIBmapnik_VERSION}" % (os.path.basename(env.subst(env['MAPNIK_LIB_NAME'])))
     target = os.path.join(env['MAPNIK_LIB_BASE_DEST'], soFile)
 
     if 'uninstall' not in COMMAND_LINE_TARGETS:
@@ -433,30 +428,8 @@ else:
             mapnik = lib_env_final.SharedLibrary('mapnik', source)
         result = env.InstallAs(target=target, source=mapnik)
         env.Alias(target='install', source=result)
-        if result:
-              env.AddPostAction(result, ldconfig)
 
-    # Install symlinks
-    target1 = os.path.join(env['MAPNIK_LIB_BASE_DEST'], "%s.%d.%d" % \
-        (os.path.basename(env.subst(env['MAPNIK_LIB_NAME'])),int(major), int(minor)))
-    target2 = os.path.join(env['MAPNIK_LIB_BASE_DEST'], os.path.basename(env.subst(env['MAPNIK_LIB_NAME'])))
-    if 'uninstall' not in COMMAND_LINE_TARGETS:
-        link1 = env.Command(target1, target, symlink)
-        env.Alias(target='install', source=link1)
-        link2 = env.Command(target2, target1, symlink)
-        env.Alias(target='install', source=link2)
-    # delete in reverse order..
-    env['create_uninstall_target'](env, target2)
-    env['create_uninstall_target'](env, target1)
     env['create_uninstall_target'](env, target)
-
-    # to enable local testing
-    lib_major_minor = "%s.%d.%d" % (os.path.basename(env.subst(env['MAPNIK_LIB_NAME'])), int(major), int(minor))
-    local_lib = os.path.basename(env.subst(env['MAPNIK_LIB_NAME']))
-    if os.path.islink(lib_major_minor) or os.path.exists(lib_major_minor):
-        os.remove(lib_major_minor)
-    os.symlink(local_lib,lib_major_minor)
-    Clean(mapnik,lib_major_minor);
 
 if not env['RUNTIME_LINK'] == 'static':
     Depends(mapnik, env.subst('../deps/agg/libagg.a'))
